//
//  MeetingWindowController.m
//  Rongcloud
//
//  Created by LiuLinhong on 2017/08/09.
//  Copyright © 2017年 Beijing Rongcloud Network Technology Co. , Ltd. All rights reserved.
//

#import "MeetingWindowController.h"
#import "AppDelegate.h"

@interface MeetingWindowController ()

@end

@implementation MeetingWindowController

- (void)windowDidLoad
{
    [super windowDidLoad];
    [self.window center];
    [self.window setOpaque:NO];
    [self.window setBackgroundColor:[NSColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.05]];
//    [self.window setAspectRatio:NSMakeSize(840, 502)];
    [self.window setMinSize:NSMakeSize(840, 502)];
    [self.window setStyleMask:NSTitledWindowMask|NSClosableWindowMask|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable];
    
    CGRect wRect = self.window.frame;
    CGRect cRect = self.window.contentView.frame;
    CGRect rect = CGRectMake(wRect.origin.x, wRect.origin.y, cRect.size.width, cRect.size.height);
    NSWindow *childVideoWindow = [[NSWindow alloc] initWithContentRect:rect styleMask:NSClosableWindowMask backing:NSBackingStoreBuffered defer:NO];
    childVideoWindow.backgroundColor = [NSColor blackColor];
    [self.window addChildWindow:childVideoWindow ordered:NSWindowBelow];
    
    AppDelegate *appDelegate = (AppDelegate *)[NSApplication sharedApplication].delegate;
    appDelegate.childWindow = childVideoWindow;
}

@end
